package com.wangyadong.hobby.schedule.jobtask.classload.chapter1;

/**
 * <p>
 *
 * @author <714037465@qq.com>
 * @since 2018/10/309:58
 **/
public class Singleton {

    private static Singleton instance = new Singleton();

    public static int y;


    public static int x = 0;
    private Singleton() {
        x++;
        y++;
    }
    public static Singleton getInstance() {
        return instance;
    }

    public static void main(String[] args) {
        Singleton singleton = getInstance();
        System.out.println(singleton.x);
        System.out.println(singleton.y);
    }
}
